Operator ? : Should Not Be Used (OSNBU)

Description:

The conditional operator ? : makes the code harder to read than the alternative form with an if statement.

Incorrect:

int[] values = GetValues();
int numValues = (values == null) ? 0 : values.Length;

Correct:

int[] values = GetValues();
int numValues = 0;
if (values != null) {
    numValues = values.Length;
}